<!DOCTYPE html>
<!--suppress ALL-->
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>学员管理</title>
    <link rel="stylesheet" href="/layui/css/layui.css" media="all">
    <script src="/js/jquery.min.js"></script>
    <script src="/layui/layui.js"></script>
</head>
<body>
<form class="layui-form">
    <!--下拉框-->
    <div class="layui-inline" style="height: 40px;width:180px;">
        <select name="typeid">
            <option value="0">请选择方式</option>
            <option value="1001">按学员名称</option>
            <option value="1002">按学员性别</option>
            <option value="1003">按城市</option>
            <option value="1004">按年级</option>
            <option value="1005">按用户</option>
        </select>
    </div>
    <!--文本框-->
    <div class="layui-inline" style="height: 40px;width: 300px;">
        <div class="layui-inline" style="height: 40px;width: 300px;">
            <input type="text" name="titl" height="0" size="80px;" placeholder="请输入关键字模糊查询" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-inline" style="height: 40px;width: 140px;">
        <div class="layui-inline" style="height: 40px;width: 140px;">
            <button class="layui-btn" lay-filter="selectlike" lay-submit  style="width: 90px;">
                <i style="color: black" class="layui-icon layui-icon-search">查询</i>
            </button>
        </div>
    </div>
</form>

<table lay-even lay-skin="line" lay-size="lg" id="demo" lay-filter="test" class="layui-table"></table>


<script>
    layui.use(['table','jquery','form'], function () {
        var table = layui.table;
        var $ = layui.jquery;
        var form=layui.form;

        //form
        form.on('submit(selectlike)', function (data) {
            table.reload('demo', {
                url: '/student/student/queryStu'
                , where: {
                    limit:10,
                    did: data.field.did,
                    valu: data.field.titl
                } //设定异步数据接口的额外参数
                //,height: 300
            });
            return false; //阻止表单跳转。如果需要表单跳转，去掉这段即可。
        });

        //table
        table.render({
            limit: 10
            , limits: [2, 4, 6, 8, 10]
            , elem: '#demo'
            , url: '/clientinfo/clientlist.do' //数据接口
            , page: true //开启分页
            , cols: [
                [ //表头
                    {field: 'clientname', title: '客户名称',toolbar:'#toupdat'}
                    , {field: 'buscount', title: '商机数',toolbar:'#morebusiness'}
                    , {field: 'summoney', title: '预计成交金额'}
                    , {field: 'concount', title: '合同数',toolbar:'#moreclient'}
                    , {field: 'sumcon', title: '合同金额'}
                    , {field: 'incmoneyall', title: '回款额'}
                    , {field: 'afterCount', title: '售后服务数',toolbar:'#moreafter'}
                    , {field: 'avgservicecore', title: '服务均分'}

                ]
            ]
        });


    });
</script>
</body>
</html>